home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AOL File Library: 4,101 to 4,200
/
aol-file-protocol-4400-4101-to-4200.zip
/
AOLDLs
/
ADV - Articles & Misc
/
Manual for ProDev DDT8_DDT16
/
DDT.MANUAL.bxy
/
DDT.Manual
/
CHAPTER.5
(
.txt
)
< prev
next >
Wrap
AppleWorks Document
|
1993-08-05
|
18KB
|
349 lines
O=====<====<====<====<====<====<====<====<====<====<====<====<====<====<====<===
O=====<====<====<====<====<====<====<====<====<====<====<====<====<====<====<===
part of the normal register display.llowing the "E" re
CHAPTER 5
DISPLAYING AND MODIFYING
DR - DISPLAY REGISTERS
Display registers produces the following displays:
{DDT8}D
A=00 X=00 Y=00 S=E0 M=0B L=0 P=--1B----
{ contents may vary }
00/FF69:20 E0 FE JSR FEE0
{DDT16}D
A=0000 X=0000 Y=0000 S=01E0 D=0000 B=00
{ contents may vary }'
M=09 Q=FF P=30=--MX---- L=0 E=0 I=0
00/0800:EA NOP
AThe various registers are represented by single letters with the G
exception of the program counter which is represented in number form.
The letters and their corresponding registers are as follows:
A = Accumulator#
X = X index#
Y = Y index)
S = Stack pointer;
M = Machine state (pseudo register)A
L = Language card state (pseudo register),
P = Processor status
{DDT16}'
D = Direct page%
B = Data Bank+
Q = Quagmire state <
E = Emulation (1 = 6502, 0 = Native)?
I = Interrupt (1 = Interrupts disabled)
The status bits are also represented by single letters as follows:
N = Negative flag)
V = oVerflow flag;
1 = expansion flag (always one) {8},
M = Memory size {16}2
B = Break command flag {8}0
X = indeX reg. size {16}-
D = Decimal mode flag3
I = Interrupt disabled flag,
Z = Zero result flag&
C = Carry flag5
- = flag not set (flag clear)
"M=0B" shows the condition of the M pseudo register.<
"L=0" gives the condition of the language card where:<
0 = ROM selected, 1 = RAM bank #1, 2 = RAM bank #2
{DDT8}K
IThe bank number (00 or 01) is calculated for the current program counter I
Glocation according to the settings of the various memory configuration I
Gswitches. The bank number is then displayed before the program counter I
Gand followed by "/". In this example "00/FF69", the bank is 00 and the
program counter is $FF69.
R=N - REGISTER = N
IThe REGISTER = N command allows you to enter a HEX value into any of the I
Gprocessor's registers. "REG=" indicates the letter(s) representing any K
Iof the valid registers followed by an "=" equal. The program counter is J
Hsignified by "PC", all of the other registers are signified by the same D
Bletters described above in the DISPLAY REGISTERS command with the G
Eexceptions; M, Q and L registers are pseudo registers and may not be
directly modified.
EXAMPLE
:A= $34
:A=34
{Change the value of the accumulator to $34}
GNote! The dollar sign is optional and also note the spaces before the F
Dnumber are ignored. In both cases the value $34 is entered into the G
Eaccumulator. To verify this simply use the DR command to display the
registers.
FThe processor status flags may also be individually set or cleared by I
Gentering "P=" followed by a "Return" and then entering a "1" or a "0"
for individual flags.
EXAMPLE
FLAGS NV1BDIZC
STATUS 00110000(
ENTER 1
{Set the Z flag}
{DDT16}
:I= 1 - I Flag
HOn a ][GS interrupts are used extensively. If you are tracing code with L
Jthe DDT16 and an interrupt occurs the normal flow of the computer program K
Itakes you to the interrupt handler routine. This can be very frustrating L
Jif you are not interested in tracing the interrupt routine. To get around K
Ithis problem a pseudo register has been added, the "I" register. The "I" K
Iregister is used to prevent outside interrupts from being serviced while
tracing code.
GEnter the command "I=1" to prevent servicing interrupts while TRacing, H
FSTepping or EXecuting code. Enter "I=0" to clear the "I" register. Be I
Gsure to set the "I" flag in the Status register to the proper state to F
Denable interrupt servicing. Please note that while the "I" register J
equals 1, the "I" flag in the status register will always get set to 1.
IAlso, please note that while tracing with the "I" register set to 1, any G
Ecommands that affect the "I" flag will essentially be ignored. It is K
Itherefore up to the user to determine the proper setting of the "I" flag 7
in the status register after using the "I=1" command.
The "I" register will not function properly if an accelerator is enabled.
Li [A] - LIST
HThe LIST command causes 20 lines of code to be displayed to the current J
Houtput device, starting at the address specified by "[A]". Omitting the G
Eoptional address will cause the listing to start at the last address
accessed by the ProDev DDT.
EXAMPLE
:LI 0/E000 or L 0/E000
{Note! If the "I" is omittedA
then at least one space must6
00/E000:RC 28 F1 JMP F128
follow the "L".
00/E003:4C 3C D4 JMP D43C
" " " "
" " " "
" " " "A
00/E02A:A5 14 LDA 14
{"L <cr>" will continue list;
from next instruction.
MD [A] - MEMORY DUMP
IThe MEMORY DUMP command displays 256 bytes of HEX data with 16 bytes per I
Grow. Each HEX byte's corresponding ASCII character is displayed at the K
Iend of each row. Omitting the optional address will cause the display to K
Istart at the last address accessed by the ProDev DDT. Control characters
are displayed as a period.
EXAMPLE
:MD 0/D0D0
00/D0D0: 45 4E C4 45 4F D2 4E 45 58 D4 44 41 54 C1 49 4E ENDFORNEXTDATAINM
00/D0E0: 50 55 D4 44 45 CC 44 49 CD 52 45 41 C4 47 D2 54 PUTDELDIMREADGRTE
" " " " " " " " " " " " " " " " " " "F
" " " " " " " " " " " " " " " " " " "
etc.
MM [A] - MEMORY MODIFY
EThe MEMORY MODIFY command allows you to enter HEX data directly into H
Fmemory. Data is input one byte (2 HEX digits) at a time. Pressing the K
I"down arrow", or "Return" on a blank line, will display the next address J
Hand data byte. Press the "up arrow" to display the previous address and J
Hdata. If more than two digits are entered, the ProDev DDT will take the H
Flast two digits entered. To exit the MEMORY MODIFY command, press the
"esc" key.
EXAMPLE
:MM 0/2000
00/2000 00 11
00/2001 00 22
00/2002 00 33%
00/2003 00 "up arrow"
{Backup}
00/2002 33 56744
00/2003 00 "up arrow"9
00/2002 44
{The last two digits entered were 44})
{Press "esc" to exit}
MA [A] - Mini-Assembler
GThe Mini-Assembler allows you to enter assembly language code directly L
Jfrom the ProDev DDT. This eliminates reloading your assembler, editing in H
Fyour modifications, assembling and loading your program each time you J
Hwish to make a simple modification or add small sections of code to try G
Enew ideas. With the ProDev DDT's mini-assembler you can modify your J
Hprogram directly and as many times as needed to get the desired result. H
FOnce the program is working properly it is only necessary to edit and H
Fassemble your source program one time. This is a great time saver and 8
should greatly increase your programming productivity.
FThe ProDev DDT's mini-assembler is patterned after the mini-assembler L
that was included in the old Apple II Monitor ROM, with some exceptions. I
GAll mnemonics are as specified by "The Western Design Center, Inc." in K
Itheir W65C816 data sheet. The addressing modes for the 6502 instructions H
Fare the same as those described for the Apple mini-assembler. The new E
Caddressing modes for the 65C02 and 65802/816 are described in the
W65C816 data sheet.
GTwo assembler directives have been included to facilitate the entry of "
Data and ProDOS calls. They are:
HEX - Allows direct entry of 2 digit hexadecimal numbers. F
D ADR - Allows direct entry of 4 digit hexadecimal addresses. The ;
addresses are stored in low order / hi order byte format.
EFollowing are the addressing modes as recognized by the ProDev DDT's
Mini-Assembler:
STANDARD 6502 ADDRESS FORMATS
TYPE: FORMAT:
accumulator Mnemonic onlyA
implied Mnemonic only6
immediate #n5
direct d7
direct indexed d,X7
d,Y5
program counter relative r9
direct indexed indirect (d,X)9
direct indirect indexed (d),Y5
absolute a7
absolute indexed a,X7
a,Y7
absolute indirect (a)
65C02 ADDRESSING FORMATS
TYPE: FORMAT:
direct indirect (d)9
absolute indexed indirect (a,X)
65802/816 ADDRESSING FORMATS
TYPE: FORMAT:
program counter relative long rl7
direct indirect long [d]9
direct indirect long indexed [d],Y6
absolute long al8
absolute long indexed al,X7
stack relative d,S;
stack relative indirect indexed (d,S),Y6
block move bb
Abbreviations:
n 1 byte number0
d 1 byte direct address1
r 2 byte relative offset6
rl 3 byte relative long offset2
a 2 byte absolute address7
al 3 byte absolute long address-
b 1 byte bank number
FAll input values are assumed to be HEX digits and as such a preceding H
Fdollar sign, "$nn", is optional. If fewer than the required number of I
digits are input for an address, the ProDev DDT will automatically add
Gleading zeros to fill the address; if more than the required number of :
digits are entered, the last to be entered will be used.
@The ProDev DDT makes no distinction between direct and absolute G
Eaddressing modes. If you enter an instruction which could use either <
direct or absolute addressing, direct will always be used.
FInstructions with accumulator and implied addressing modes do not use
operands.
IThe destination address for branch instructions is entered directly and F
Dthe relative offset is automatically calculated. If the destination E
Caddress is out of branch range, the ProDev DDT will respond with a K
I"beep", the message "ERR BRANCH OUT OF RANGE" and will reject the input. L
JIf you input an instruction which the ProDev DDT does not recognize or if K
Iyou attempt to modify an instruction which currently has a Real break at I
Gthat address, the ProDev DDT will "beep" and place a circumflex, "^", (
under the general area of the problem.
EMnemonics and addressing modes of the 65C02 or 65802/816 will not be K
Iaccepted unless the proper mode has been selected. (See the "MO" command -
for an explanation of how to change modes.)
DWhen you enter the mini-assembler the prompt will be changed from a G
Ecolon, ":", to an exclamation point, "!". The current instruction is -
disassembled and displayed at each address.
DNote! The program counter is not affected by the "MD", "MM" or "MA" J
Hcommands. This means you can be tracing a program, stop, go modify data L
Jin memory and return to tracing without losing your last position or the $
contents of any of your registers.
EXAMPLE
Input a short program. (This program will also be used in later examples)
:MA 0/2000
00/2000:00 BRK
{ the current instruction is BRK:
!LDA #00
{ enter the new instructionA
A9 00
{ code generated by mini-assemblerB
00/2002:00 BRK
{ the next instruction is displayed%
!STA 6
{ etc.
85 06
00/2004:00 BRK
!LDA#30
{ notice that spaces are optional
A9 30
00/2006:00 BRK
!STA 7
85 07
00/2008:00 BRK
!LDY #1
A0 01
00/200A:00 BRK
!LDA (06),Y
B1 06
00/200C:00 BRK
AA
00/200D:00 BRK
!STX 3002
8E 02 30
00/2010:00 BRK
E8
00/2011:00 BRK
!BNE 200D
D0 FA
00/2013:00 BRK
{ "esc" returns to command level
MW - MEMORY WINDOW
JCommand MW allows you to select the various memory locations that you are I
Ginterested in monitoring in the memory window. When you enter "MW" the F
Dcursor will be placed in the memory window on the first address. To I
Gchange an address, use the Return key or Down arrow to move the cursor I
Gover the desired address. Change the desired digits by using the right J
Hand left arrows to position the cursor and simply enter the new digits. F
DPress the "esc" key to exit the memory window. The contents of each 1
memory location are displayed in Hex and ASCII.
IIn Serial mode the MW command will not display anything on your terminal K
Ibut will expect you to enter the addresses anyway. You would NOT want to C
Ado that since you don't have the memory window displayed on your F
Dterminal. Use the Memory Modify command to examine memory locations
instead.
PW - PROTECTION WINDOW
IThe protection window consists of six address ranges. Each address range L
Jconsists of a type letter followed by a bank number followed by the first D
address of the range, a period, and the last address in the range.
There are three types of ranges. They are:
I T - Trace range. A trace range allows specified sections of code to H
Fbe executed in real-time. During tracing or executing, if the program I
Gcounter is placed inside a T range by a JSR{8} or JSL{16} instruction, C
Athe program will start real-time execution until the instruction K
Ifollowing the JSR/JSL in memory is reached. This is very useful for time -
critical sections of code such as disk I/O.
D{DDT16} Note! The stack is treated as native. Failure will occur if G
target code is emulation mode (8 bit) JSR & stack is at $101 or $100.
I P - Program only. If one or more program only ranges are specified, J
the program counter must remain inside one of the P ranges at all times
Eduring tracing or executing. If the program counter ventures outside K
Ithese ranges, execution will stop and the message "OUTSIDE RANGE LIMITS" L
Jwill be displayed. Code that is running in real-time or is contained in a
Trace range is not affected.
C N - No access. This range is active ONLY when Tracing. If the H
Feffective address of any instruction, or the current program counter, I
Genters a No access address range, program execution will be halted and H
Fthe message "NO ACCESS HALT" will be displayed. This is one case when =
using the "OFF" command to speed up tracing may be desired.
J "Space" - cancel current range. Entering a space over the range type H
Fwill cancel the effect of the current range. The address of the range :
will not be affected and the range type may be restored.
D If you enter the command "PW" the cursor will be placed in the J
Hprotection window. Use the "down" arrow or "Return" key to position the I
Gcursor over the desired range. Enter the range type letter followed by F
the address information. Leave the window by pressing the "esc" key.
H In serial I/O mode, the ranges will be displayed one at a time and I
Gyou will be given an opportunity to enter new information or go to the
next range.
EXAMPLES
G
T00/8000.8200
Begin real-time execution if the program counter 0
enters the range of $8000 to $8200 in bank 00.
I
P01/0800.4000
Stop execution if the program counter gets outside *
the range from $800 to $4000 in bank 01.
A
N00/0100.01FF
Stop tracing if the program counter or the E
Ceffective address of any instruction enters the range from $100 to +
$1FF in bank 00. Works only when tracing.